#ifndef DATE_TIME_H
#define DATE_TIME_H

#include <iostream>
#include <string>
#include "date.h"
#include "time.h"
typedef unsigned char u8;

using namespace std;

class DateTime : public Time, public Date // 先构造time，再构造date，先析构date，再析构time
{
public:
    DateTime(int y, u8 mon, u8 d, u8 h, u8 m, u8 s) : Date(y, mon, d), Time(h, m, s)
    {
    }
    ~DateTime()
    {
        cout << "DateTime object is destroyed" << endl;
    }
    string tostring();
};

#endif // DATE_TIME_H